//
//  WBDemoViewController.swift
//  仿微博
//
//  Created by RaoBo on 2018/12/9.
//  Copyright © 2018年 RB. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        //测试标题
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个";
    }

    //MARK:- 跳转下一个控制
    @objc private func showNext() {
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController {
    override func setupUI() {
        super.setupUI()
        
        navItem.rightBarButtonItem = UIBarButtonItem(rb_title: "下一个", target: self, action: #selector(showNext))
        
        view.backgroundColor = UIColor.orange
        let lb = UILabel.init(frame: CGRect(x: 10, y: 100, width: 100, height: 30))
        lb.text = "测试控制器";
        lb.backgroundColor = UIColor.lightGray
        view.addSubview(lb)
    }
}

